/*******************************************************************************
 * Copyright (c) 2008 Nels E. Beckman.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    Nels E. Beckman - initial API and implementation
 *******************************************************************************/
package edu.cmu.cs.nbeckman.wptranslator;

/**
 * This element contains bold text.
 * 
 * @author Nels E. Beckman
 */
public class BoldedElement implements Element {

	private final Element text;
	
	public BoldedElement(Element text) {
		this.text = text;
	}
	
	@Override
	public String drawAsHTML() {
		return "<b>" + this.text.drawAsHTML() + "</b>";
	}

	/**
	 * Primarily for testing.
	 */
	Element getElement() {
		return text;
	}

	@Override
	public String drawAsRTF() {
		return "{\\b " + text.drawAsRTF() + "}";
	}
}
